﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Shapes;
using KBS8.Shared;

namespace KBS8.Data
{
    public class DataManager
    {
        private static DataManager _instance;
        private GdfDataFilter.GdfDataFilter _gdfDataFilter;
        private GdfDataParser.GdfDataParser _gdfDataParser;
        private DataManager()
        {
            _gdfDataFilter = new GdfDataFilter.GdfDataFilter();
        }
        
        /// <summary>
        /// Returns the road data
        /// </summary>
        /// <param name="area">Area of which the road data needs to passed through</param>
        /// <param name="zoomlevel">The zoomlevel</param>
        public void GetRoadData(MapTile area, int zoomlevel)
        {
            _gdfDataFilter.GetFilteredMapData(area, zoomlevel);
            
        }
        /// <summary>
        /// Access method for the DataManager
        /// </summary>
        /// <returns>The singleton instance of DataManager</returns>
        public static DataManager GetInstance()
        {
            if (_instance == null)
                _instance = new DataManager();

            return _instance;
        }

        public void ParseData(out AreaFeature[] areaFeatures, out LineFeature[] lineFeatures,
                              out ComplexFeature[] complexFeatures, out PointFeature[] pointFeatures)
        {
            //_gdfDataParser.ParseData(out areaFeatures, out lineFeatures, out complexFeatures, out pointFeatures);
            throw new NotImplementedException();
        }
    }
}
